# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+aur@gmail.com>

pkgname=perl-email-mime
pkgver=1.953
pkgrel=2
pkgdesc="Easy MIME message parsing"
arch=('any')
url="https://search.cpan.org/dist/Email-MIME"
license=('GPL' 'PerlArtistic')
depends=('perl-email-mime-encodings>=1.3' 'perl-mime-types>=1.13'
	 'perl-email-simple>=2.003' 'perl-email-mime-contenttype>=1.011'
	 'perl-email-messageid' 'perl-email-address-xs' 'perl-module-runtime')
provides=("perl-email-mime-creator=$pkgver" "perl-email-mime-modifier=$pkgver")
replaces=("perl-email-mime-creator" "perl-email-mime-modifier")
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Email-MIME-$pkgver.tar.gz)
sha256sums=('98fb067850699a224babc348f1cefe30d744c60da8902e7a5ce9d8b7e73df735')

build() {
  cd  "$srcdir"/Email-MIME-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package(){
  cd  "$srcdir"/Email-MIME-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
